package com.sf.fy.uav.common.enums;

public enum TcOrderStatusEnum {

    ORDER_CREATED(1,"订单创建"),
    ORDER_CANCELED(2,"订单取消"),
    //配送员接单/配送员改派
    DELIVERYMAN_RECEIVE_AN_ORDER(10,"配送员接单"),
    DELIVERYMAN_ARRIVE_SHOP(12, "配送员到店"),
    //配送员配送中（已取货)
    DELIVERYMAN_IN_DELIVERY(15, "配送员配送中(已取货)"),
    DELIVERYMAN_DELIVERY_COMPLETED(17, "配送员妥投完单"),
    //配送员撤单	注:仅订单回调才会有
    DELIVERYMAN_CANCEL_ORDER(22, "配送员撤单"),
    //骑士上报异常	注:仅订单回调才会有
    DELIVERYMAN_REPORT_EXCEPTION(91, "骑士上报异常"),
    ORDER_CANCELING(31, "取消中"),
    //地勤揽件特殊值
    NOT_TC(-1024,"地勤揽件"),;


    private Integer status;
    private String name;


    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    TcOrderStatusEnum(Integer status, String name) {
        this.status = status;
        this.name = name;
    }

    public static String getName(Integer status) {
        for (TcOrderStatusEnum ele : values()) {
            if (ele.getStatus().equals(status)) {
                return ele.getName();
            }
        }
        return null;
    }
}
